<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button ui-sref="tab.meIndex" class="button return-btn">返回</button>
    <h1 class="title" ng-click="backToTop()">我的收藏</h1>
    <button class="button hd-red-btn" ng-if="showWhich[3]||showWhich[4]||showWhich[5]||showWhich[6]" ng-click="clickEditBtn()" ng-bind="rightBtnText">编辑</button>
  </ion-header-bar>
  <div class="bar bar-subheader gray-bg">
    <div class="tabs tads-nav">
      <a class="tab-item" ng-class="{'active':showWhich[0]}" on-touch="showCollectWine()">酒款</a>
      <a class="tab-item" ng-class="{'active':showWhich[1]}" on-touch="showCollectMeeting()">活动</a>
      <a class="tab-item" ng-class="{'active':showWhich[2]}" on-touch="showCollectHome()">酒窝</a>
      <a class="tab-item" ng-class="{'active':showWhich[3]}" on-touch="showCollectMessage()">资讯</a>
      <a class="tab-item" ng-class="{'active':showWhich[4]}" on-touch="showCollectVideo()">视频</a>
      <a class="tab-item" ng-class="{'active':showWhich[5]}" on-touch="showCollectBook()">书籍</a>
      <a class="tab-item" ng-class="{'active':showWhich[6]}" on-touch="showCollectChapter()">章节</a>
    </div>
  </div>
  <!--on-touch="touchIndex()" on-swipe-left="swipeLeft()" on-swipe-right="swipeRight()"-->
  <ion-content class="gray-bg has-subheader" has-bouncing="true">
        <!--显示我收藏的酒款-->
    <tab-slide-box tab="0">
      <ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)" delegate-handle="delegate-handle">
        <ion-slide>
            <ion-content class="gray-bg">
              <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshWine()"></ion-refresher>
              <div class="list">
                <ul>
                  <li class="item myitem-checkbox product-item" ng-repeat="item in collectWineList">
                    <label class="mycheckbox" on-touch="selectCollectWine($index)">
                      <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                        <input type="checkbox"/>
                      </em>
                    </label>
                    <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                      <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                      <h3 style="color:#000" ng-bind="item.wine_cn_name"></h3>
                      <p class="product-item-eng" ng-bind="item.wine_en_name"></p>
                      <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='﹢'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                      <p>参考价：<em class="product-item-money">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                    </a>
                  </li>
                </ul>
              </div>
            </ion-content>
          </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshMeeting()"></ion-refresher>
          <div class="list">
            <ul>
              <li class="card card-item-li" ng-repeat="meeting in collectMeetingList">
                <a ng-href="#/date-details/{{meeting.mm_id}}">
                  <div class="item item-image">
                    <div class="card-item-img">
                      <div class="card-item-bg">
                        <div class="card-item-con">
                          <h3 ng-bind="meeting.mm_title">周末一起以酒会友</h3>

                          <p class="card-item-blue"><i class="card-addr-icon"></i>{{meeting.mm_address}}</p>

                          <p><i class="card-time-icon"></i>{{meeting.mm_time | date:"yyyy-MM-dd hh:mm"}}</p>
                        </div>
                      </div>
                      <img ng-src="{{picPath}}middle_{{meeting.mm_img_url}}" style="height:250px;width:100%" alt=""/>
                    </div>
                  </div>
                  <div class="item item-avatar card-item-tit">
                    <div class="card-user-hd">
                      <a>
                        <div class="card-user-hd-pic">
                          <img ng-src="{{picPath}}{{meeting.member_img_url}}" alt=""/>
                          <i class="card-user-hd-icon"><img ng-src="{{picPath}}{{meeting.mr_img_url}}" alt=""/></i>
                        </div>
                      </a>
                    </div>
                    <h2 class="card-user-hd-name" ng-bind="meeting.member_name"></h2>

                    <div class="tabs tabs-icon-only card-item-ctrl">
                      <a class="tab-item" on-touch="showMeetingShare(meeting.mm_id)" ng-show="isShareShow">
                        <i class="icon card-share-icon"></i>
                      </a>
                      <a class="tab-item" ng-click="collectMeeting($index,meeting.mm_id)">
                        <i class="icon card-collect-icon" ng-class="{'active':meeting.mcStatus}"></i>
                      </a>
                      <a class="tab-item" ng-click="likeMeeting($index,meeting.mm_id)">
                        <i class="icon card-praise-icon" ng-class="{'active':meeting.lmeetStatus}"></i>
                      </a>
                      <a class="tab-item" ng-href="#/meetingComment/{{meeting.mm_id}}">
                        <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="meeting.mm_comment_num"></em></i>
                      </a>
                    </div>
                  </div>
                </a>
              </li>
            </ul>
          </div>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshHome()"></ion-refresher>
          <div class="list">
            <div class="list card dimple-card-item" ng-repeat="item in collectHomeList">
              <div class="item item-avatar">
                <div class="dimple-card-user-hd">
                  <div class="dimple-card-user-hd-pic" ng-click="go2OtherHome(item.homeMemberInfo.member_id)">
                    <img ng-src="{{picPath}}{{item.member_img_url}}" alt=""/>
                    <i class="dimple-card-user-hd-icon"><img ng-src="{{picPath}}{{item.mr_img_url}}" alt=""/></i>
                  </div>
                </div>
                <h2 ng-bind="item.member_name"></h2>

                <p style="font-size:11px">{{item.mh_create_time}}</p>
              </div>
              <div class="item item-body dimple-card-content">
                <p ng-bind="item.mh_content"></p>

                <div class="dimple-card-photo-list" ng-if="item.picSrc.length>1">
                  <div class="dimple-card-photo-item" ng-repeat="pic in item.picSrc">
                    <a ng-click="showBigImage($parent.$index,$index)" class="dimple-card-photo-li-pic"><img ng-src="{{picPath}}{{pic.src}}" alt=""/></a>
                  </div>
                </div>
                <div ng-if="item.picSrc.length==1" style="padding:5px 0">
                  <img ng-src="{{picPath}}{{item.picSrc[0].src}}" ng-click="showBigImage($parent.$index,$index)" ng-style="{width:item.picSrc[0].w/item.picSrc[0].h>=5||item.picSrc[0].h/item.picSrc[0].w>=5?'20%':'50%'}"  alt=""/>
                </div>
                <div class="dimple-card-address" ng-bind="item.mh_location"></div>
              </div>
              <div class="item tabs dimple-card-tad">
                <div class=" tabs tabs-icon-only card-item-ctrl">
                  <a class="tab-item" ng-show="isShareShow">
                    <i class="icon card-share-icon" on-touch="showHomeShare(item.mh_id)"></i>
                  </a>
                  <a class="tab-item">
                    <i class="icon card-collect-icon" ng-click="collectHome($index,item.mh_id)" ng-class="{'active':item.mchomeStatus}"></i>
                  </a>
                  <a class="tab-item">
                    <i class="icon card-praise-icon" ng-click="likeHome($index,item.mh_id)" ng-class="{'active':item.lhomeStatus}">
                    </i>
                  </a>
                  <a class="tab-item"  ng-href="#/homeComment/{{item.mh_id}}">
                    <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="item.mh_comment_num"></em></i>
                  </a>
                </div>
              </div>
            </div>
          </div>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshMessage()"></ion-refresher>
          <div class="list">
            <ul>
              <li ng-repeat="newsItem in collectMessageList" ng-class="{'item item-checkbox collect-news-edit-item':showEdit}">
                <label class="checkbox" ng-if="showEdit" on-touch="selectCollectMessage($index)">
                  <em class="product-item-checkbox" ng-class="{'active':newsItem.selected}">
                    <input type="checkbox"/>
                  </em>
                </label>
                <!--  ng-href="#/newsDetails/{{newsItem.message_id}}" -->
                <a class="item item-thumbnail-left" ng-click="readMessage(newsItem.message_id,'myCollect')">
                  <img ng-src="{{picPath}}{{newsItem.message_icon}}" alt="" class="news-item-pic"/>
                  <h2 class="news-item-tit" ng-bind="newsItem.message_title"></h2>
                  <p class="news-item-con" ng-bind="newsItem.message_summary"></p>
                  <p class="news-item-date">{{newsItem.message_time | date:"yyyy-MM-dd hh:mm"}}</p>
                </a>
              </li>
            </ul>
          </div>
          </ion-content>
          </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshVideo()"></ion-refresher>
          <div class="list">
            <ul class="row row-wrap">
              <li class="col-50" ng-repeat="item in collectVideoList">
                <a ng-href="#/video-details/{{item.video_id}}">
                  <div class="video-li-box">
                    <div class="video-li-pic">
                      <em class="video-li-time" ng-bind="item.video_time_length"></em>
                      <i class="video-li-play-icon"></i>
                      <span class="video-black-bg"></span>
                      <img src="{{picPath}}{{item.video_background}}" alt=""/>
                    </div>
                  </div>
                </a>
                <!--<div class="video-li-tit"><i on-touch="collectVideo(item.video_id)" class="video-li-icon fr" ng-class="{'active':item.vcStatus}"></i>{{item.video_title}}</div>-->
                <div class="video-li-tit">
                  <i class="video-li-icon-select fr" on-touch="selectCollectVideo($index)" ng-class="{'active':item.selected}" ng-if="showEdit"></i>
                  {{item.video_title}}</div>
              </li>
            </ul>
          </div>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshBook()"></ion-refresher>
          <div class="list">
            <ul class="row row-wrap">
              <li class="col-33" ng-repeat="item in collectBookList">
                <div class="book-li-pic">
                  <label>
                    <em class="collect-book-edit-checkbox" ng-class="{'active':item.selected}" on-touch="selectCollectBook($index)" ng-if="showEdit">
                      <input type="checkbox"/>
                    </em>
                  </label>
                  <!--<i on-touch="collectBook(item.book_id,item.book_type)" class="book-li-icon" ng-class="{'active':item.mcStatus}"></i>-->
                  <!--<i class="book-li-icon" ng-class="{'active':item.selected}" on-touch="selectCollectBook($index)" ng-if="showEdit"></i>-->
                  <!--  ng-click="readBook(item.book_id,'myCollect')" -->
                  <a ng-href="#/book-catalog/{{item.book_id}}">
                    <div class="book-li-img">
                      <img ng-src="{{picPath}}{{item.book_cover}}" alt="{{item.book_title}}"/>
                    </div>
                  </a>
                </div>
                <div class="book-li-tit" ng-bind="item.book_title"></div>
              </li>
            </ul>
          </div>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefreshChapter()"></ion-refresher>
          <div class="list collect-catalog-list">
            <ul>
              <li ng-class="{'item item-checkbox collect-catalog-edit-list':showEdit}" ng-repeat="item in collectChapterList">
                <label class="checkbox" ng-if="showEdit" on-touch="selectCollectChapter($index)">
                  <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                    <input type="checkbox"/>
                  </em>
                </label>
                <!--  ng-click="readBookDetail(item.book_detail_id,'collect')"-->
                <a ng-href="#/book-details/{{item.book_detail_id}}" class="item item-thumbnail-left collect-catalog-item">
                  <div class="collect-catalog-pic">
                    <img ng-src="{{picPath}}{{item.book_cover}}" alt=""/>
                  </div>
                  <h2 class="collect-catalog-tit" ng-bind="item.book_title">美酒生活第一期第一章节</h2>
                  <p ng-bind="item.bd_chapter_info">竞技与美酒同在</p>
                </a>
              </li>
            </ul>
          </div>
          </ion-content>
        </ion-slide>
        </ion-slide-box>
      </tab-slide-box>
  </ion-content>
  <!--我收藏的酒款结束-->
    <!----显示收藏的活动-->
    <!----显示收藏的活动结束-->
    <!----显示收藏的酒窝-->
    <!----显示收藏的酒窝结束-->
    <!----显示收藏的资讯-->
    <!----显示收藏的资讯结束-->
    <!----显示收藏的视频-->
    <!----显示收藏的视频结束-->
    <!----显示收藏的书籍-->
    <!----显示收藏的书籍结束-->
    <!----显示收藏的章节-->
    <!----显示收藏的章节结束-->
  <ion-footer-bar ng-if="(rightBtnText=='取消'||showWhich[0]) && !showConfirmNoCollect">
    <div class="bar bar-footer footer-txt footer-white">
      <label class="mt5" style="width:60px" on-touch="selectAllBottom()">
        <em class="footer-checkbox" ng-class="{'active':bottomCheckBoxSelected}">
          <input type="checkbox"/>
        </em>
        全选
      </label>
      <div class="absolute-right" ng-if="!showWhich[0]">
        <button class="button button-small grey-bottom-btn" type="button" ng-click="cancelCollect()">取消收藏</button>
      </div>
      <div class="absolute-right"  style="width:145px" ng-if="showWhich[0]">
        <button class="button button-small grey-bottom-btn" type="button" ng-click="cancelCollect()">取消收藏</button>
        <button class="button button-small claret-red-btn" type="button" ng-click="addToWineRecommend()" ng-if="showWhich[0]">加入酒单</button>
      </div>
    </div>
  </ion-footer-bar>
</ion-view>
